package com.guli.common.to;
/*
 * @Author 罗俊
 * @date 2020/11/30 - 4:00 下午
 *
 */

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.guli.common.pojo.vo.SkuVo;
import com.guli.common.valid.AddGroup;
import com.guli.common.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class SpuAndSkuListTo {

    /**
     * sku 信息
     * */

    /**
     * 商品id
     */
    @TableId
    @Null(groups = AddGroup.class)
    private Long id;
    /**
     * 商品名称
     */
    @NotEmpty(groups = AddGroup.class)
    private String spuName;
    /**
     * 商品描述
     */
    @NotEmpty(groups = AddGroup.class)
    private String spuDescription;
    /**
     * 所属分类id
     */
    @NotNull(groups = AddGroup.class)
    private Long catalogId;
    /**
     * 品牌id
     */
    @NotNull(groups = AddGroup.class)
    private Long brandId;
    /**
     *
     */
    @NotNull(groups = AddGroup.class)
    private BigDecimal weight;
    /**
     * 上架状态[0 - 下架，1 - 上架]
     */
    @NotNull(groups = AddGroup.class)
    private Integer publishStatus;
    /**
     *
     */
    @Null(groups = {AddGroup.class, UpdateGroup.class})
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     *
     */
    @Null(groups = {AddGroup.class, UpdateGroup.class})
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    private List<SkuVo> skuVos;
}
